const { defineConfig } = require('@vue/cli-service')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')

module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    plugins: [new NodePolyfillPlugin()],
  },
  devServer: {
    proxy: {
      "/api": {
        target: "http://localhost:3003/",
        pathRewrite: { // 重写路径
          "^/api": ""
        },
        changeOrigin: true //允许跨域
      }
    }
  }
})
